package arbori;

import Interpretor.Context;
import visitor.Visitor;

public class ArboreFunctional {

	private Nod radacina;

	public ArboreFunctional(Nod radacina) {
		this.setRadacina(radacina);
	}
	
	public void setRadacina(Nod radacina) {
		this.radacina = radacina;
	}

	public Nod getRadacina() {
		return radacina;
	}

	/*
	public double calculezValoare(double x) {
		getRadacina().setX(x);
		return getRadacina().calcul();
	}

	public String derivata() {
		return getRadacina().derivare();
	}

	public double calculezDerivata(double x) {
		getRadacina().setX(x);
		return getRadacina().calculDerivata();
	}

	public String toString() {
		// TODO Auto-generated method stub
		return radacina.toString();
	}
	*/
	
	public void acceptVisitor(Visitor v) {
		v.visit(getRadacina());
	}
	public void actual(Context context) {
		context.actual(radacina);
	}

}
